
<script>
import {get, showSuccess} from './util'
import config from './config'
import qcloud from 'wafer2-client-sdk'


export default {
  async created () {
    // const res = await get('/weapp/demo')
    // console.log(123, res)
    let user = wx.setStorageSync('userinfo')
    if(!user){
    // qcloud.setLoginUrl(config.loginUrl);
          // qcloud.login({
          //     success: function (userInfo) {
                      // wx.setStorageSync('userinfo',userInfo)
                      // showSuccess('登陆成功')
          //         console.log('登陆成功',userInfo);
          //     },
          //     fail: function (err) {
          //         console.log('登陆失败',err);
          //     }
          // });
    }
    console.log('小程序启动了')
      
  }
}
</script>

<style>
.text-footer{
  text-align: center;
  font-size: 12px;
  margin-bottom:5px;
}
.text-primary{
  color:#EA5149;
}
.btn{
  color:white;
  background:#EA5A49;
  margin-bottom: 10px;
  padding-left: 15px;
  padding-left: 15px;
  border-radius: 2px;
  font-size: 16px;
  line-height: 40px;
  height: 40px;
  width: 100%;
}
.btn:active{
  background: #FA5A49;
}
</style>
